﻿@model Devonline.Identity.Admin.Models.LoginViewModel
@{
    Layout = null;
    ViewBag.Title = "用户登录";
    //Model.ErrorMessage = "当前用户不允许登陆, 请联系管理员处理!";
}


<html lang="en">
<head>
    <meta charset="utf-8">
    <title>统一认证与授权中心 - 用户登录</title>
    <link rel="shortcut icon" href="~/favicon.ico" />
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="~/lib/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="~/css/login.css">
</head>
<body class="page-md login" onkeydown="if (event.keyCode == 13) { Account.onLogin(); }">
    <div class="content">
        <div class="logo">
            <h3>统一认证与授权中心</h3>
        </div>

        <div class="qr-method method col-md-6">
            <div class="next-loading next-loading-inline">
                <div class="next-loading-wrap">
                    <div class="qrlogin-title">扫码登录</div>
                    <div class="qrcode-wrap app-text-wrap">
                        <div class="qrcode-wrapper">
                            <img id="qrcode-wx" class="qrcode-wx" src="/img/qrcode-wx.png" alt="二维码">
                        </div>
                        <div class="methods-text">使用微信扫码登录</div>
                    </div>
                </div>
            </div>
        </div>

        <div class="password-and-mobile-method method col-md-6">
            <div class="main-sign">
                <ul class="nav nav-tabs form-title">
                    <li class="active">
                        <a href="#password-login" role="tab" data-toggle="tab" aria-expanded="true" onclick="Account.clearErrorInfo(this)">帐号登录</a>
                    </li>
                    <li class="">
                        <a href="#sms-login" role="tab" data-toggle="tab" aria-expanded="false" onclick="Account.clearErrorInfo(this)">手机号登录</a>
                    </li>
                </ul>

                <div class="tab-content">
                    <div id="password-login" role="tabpanel" class="tab-pane fade active in">
                        <form action="/account/login" method="post">
                            <div class="login-error">
                                <span class="error-info">@Model.ErrorMessage</span>
                            </div>
                            <input type="hidden" name="type" value="Password">
                            <div class="form-group">
                                <div class="input-icon">
                                    <i class="fa fa-user"></i>
                                    <input class="form-control placeholder-no-fix" type="text" placeholder="请输入用户名" name="userName">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="input-icon">
                                    <i class="fa fa-lock"></i>
                                    <input class="form-control placeholder-no-fix" type="password" placeholder="请输入密码" name="password">
                                </div>
                            </div>
                            @*<label class="checkbox" style="margin-left:20px;">
                            <span class="checker"><span><input type="checkbox" name="autoLogin"></span></span> 记住我的登录状态
                            </label>*@

                            <input type="hidden" name="returnUrl">
                            <div class="form-actions">
                                <button type="button" class="btn blue pull-right" onclick="Account.onLogin(this)">登 录</button>
                            </div>
                        </form>
                    </div>

                    <div id="sms-login" role="tabpanel" class="tab-pane fade sms-login">
                        <form action="/account/login" method="post">
                            <div class="login-error">
                                <span class="error-info">@Model.ErrorMessage</span>
                            </div>
                            <input type="hidden" name="type" value="Captcha">
                            <div class="form-group">
                                <div class="input-icon phoneNumber">
                                    <i class="fa fa-mobile-phone">+86</i>
                                    <input class="form-control placeholder-no-fix" type="text" placeholder="请输入手机号码" name="userName">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="input-icon captcha">
                                    <input class="form-control placeholder-no-fix" placeholder="请输入验证码" name="password">
                                    <i class="fa">
                                        <span class="countdown"></span>
                                        <a onclick="Account.sendCaptcha(this)" class="send-btn-link send-btn-disabled">获取验证码</a>
                                    </i>
                                </div>
                            </div>
                            @*<label class="checkbox" style="margin-left:20px;">
                            <span class="checker"><span><input type="checkbox" name="autoLogin"></span></span> 记住我的登录状态
                            </label>*@
                            <input type="hidden" name="returnUrl">
                            <div class="form-actions">
                                <button type="button" class="btn blue pull-right" onclick="Account.onLogin(this)">登 录</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            @if (Model.ExternalProviders.Any())
            {
                <div class="more-sign">
                    <h6>其他方式登录</h6>
                    <ul>
                        @foreach (var provider in Model.ExternalProviders)
                        {
                            <li class="list-inline-item">
                                <a class="btn" asp-controller="External" asp-action="Challenge" asp-route-scheme="@provider.AuthenticationScheme" asp-route-returnUrl="@Model.ReturnUrl">
                                    <img src="@provider.Icon" alt="@provider.DisplayName" />
                                </a>
                            </li>
                        }
                    </ul>
                </div>
            }
        </div>

        <div class="protocol col-md-12">
            <div class="sc-eCImPb juxDxC" data-spm-anchor-id="5176.12901015-2.0.i5.ac7e525cTjbHbB">登录视为您已同意第三方账号绑定协议、服务条款、隐私政策</div>
        </div>
    </div>

    <footer class="border-top footer text-center">
        <div class="container">
            &copy; 2020-@DateTime.Now.Year - www.devonline.cn <a href="https://beian.miit.gov.cn/" target="_blank">陕ICP备14006366号-1</a>
        </div>
    </footer>

    <script src="~/lib/jquery/dist/jquery.min.js" asp-append-version="true"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.min.js" asp-append-version="true"></script>
    <script src="~/lib/backstretch/jquery.backstretch.min.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/lib//devonline/js/com.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/lib//devonline/js/config.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/lib//devonline/js/extensions.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/lib//devonline/js/localCache.js" type="text/javascript" asp-append-version="true"></script>
    <script src="~/js/account.js" asp-append-version="true"></script>
    <script>
        $(function() {
            $.backstretch(["/img/bg/1.jpg", "/img/bg/2.jpg", "/img/bg/3.jpg"], { fade: 1000, duration: 3000 });
        });
    </script>
    <span role="status" aria-live="polite" class="select2-hidden-accessible"></span>
    <div class="backstretch">
        <img src="~/img/bg/1.jpg">
    </div>
</body>
</html>